package cn.ujn.medicalbackend.service;

import cn.ujn.medicalbackend.domain.Account;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletRequest;

/**
 * @author 26532
 * @description 针对表【account】的数据库操作Service
 * @createDate 2024-10-24 12:12:34
 */
public interface AccountService extends IService<Account> {

    Account accountLogin(String uname, String pwd, HttpServletRequest request);

    int userLogout(HttpServletRequest request);

    Account getSafetyAccount(Account originAccount);

    /**
     * 获得当前用户登录信息
     *
     * @param request
     * @return
     */
    Account getLoginAccount(HttpServletRequest request);

    /**
     * 是否为管理员
     *
     * @param request
     * @return
     */
    boolean isAdmin(HttpServletRequest request);
}
